'''
Created on Oct 30, 2012

@author: peng
'''
import json

def test(p1, p2, p3=None, p4=None):
    print p1, p2

kwargs = {'p1':'testp1', 'p2': 'testP2', 'p3':'testP3'}
kwargs.update({'p3': 434})
test(**kwargs)


dict_test = {'test': 10, 'more': 300}
print dict_test.pop('test')

test = {'steps':[{'name':'step-1-name', 'main_class':'main_class', 'step_args':['-i', 'ipath/', '-o', 'output/path']}, {'name':'step-2-name', 'main_class':'main_class', 'step_args':['-i', 'path/to/input', '-o', 'path/to/output']}]}

json_str = json.dumps(test)
print json_str


l = ['a', 'b', 'c', 'd', 'e', 'f', 'g']

print l
dic = dict([str(l.index(v)), v] for v in l)
